package com.hlf.modules.api.mapper;

import com.hlf.modules.api.entity.CartEntity;
import com.hlf.modules.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 购物车
 */

@Mapper
public interface CartEntityMapper extends BaseMapper<CartEntity>{
    int deleteByPrimaryKey(Long id);

    int insert(CartEntity record);

    int insertSelective(CartEntity record);

    CartEntity selectByPrimaryKey(Long id);

    List<CartEntity> selectListByTableId(Long id);

    int updateByPrimaryKeySelective(CartEntity record);

    int updateByPrimaryKey(CartEntity record);

    CartEntity selectByGoodsIdAndTableId(@Param("goodsId") Long goodsId ,@Param("tableId") Long tableId);

    int deleteByTableId(@Param("tableId") long tableId);

    Integer selectCountByTableId(@Param("tableId") Long tableId);
}